<template>
    <div class="show">
            <div class="leftPanel">
                <div class="seachPanel">
                    <div class="seachTitle">项目查询分析</div>
                 
                    <el-select placeholder="项目类别" class="handle-select mr10" v-model="params.xjxqlb"  size="mini" @change="tjChange" clearable>
                        <el-option :label="item.name" :value="item.value" v-for="(item) in projectType" :key="item.value"></el-option>
                    </el-select>
                  
                    <el-select placeholder="投资类型" class="handle-select mr10" v-model="params.tzlx" size="mini" @change="tjChange" clearable>
                        <el-option :label="item.name" :value="item.value" v-for="(item) in projectProgress" :key="item.value"></el-option>
                    </el-select>
               
                    <!-- <el-select placeholder="项目实施单位" class="handle-select mr10" v-model="params.projImplementOrg" size="mini" @change="tjChange">
                        <el-option :label="item" :value="item=='全部'?'':item" v-for="(item) in projImplementOrgs" :key="item"></el-option>
                    </el-select> -->
               
                    <!-- <el-date-picker  class="handle-select mr10" type="month" v-model="params.consStartYear" placeholder="项目开始时间" value-format="yyyy/MM" size="mini" @change="tjChange"></el-date-picker> -->
                    <!-- <el-date-picker  class="handle-select mr10" type="month" v-model="params.consEndYear" placeholder="项目结束时间" value-format="yyyy/MM" size="mini" @change="tjChange"></el-date-picker> -->

                     <el-select placeholder="建设性质" class="handle-select mr10" v-model="params.build_property_id" size="mini" @change="tjChange" clearable>                    
                        <el-option :label="item.name" :value="item.name=='全部'?'':item.value" v-for="(item) in constructionEvolves" :key="item.value"></el-option>
                    </el-select>
                   
                    <!-- <el-date-picker  class="handle-select mr10" type="date" v-model="params.planStartWorkTime" placeholder="预计开复工时间" value-format="yyyy/MM/dd" size="mini" @change="tjChange"></el-date-picker> -->

                    <!-- <el-date-picker  class="handle-select mr10" type="date" v-model="params.realStartWorkTime" placeholder="实际开复工时间" value-format="yyyy/MM/dd" size="mini" @change="tjChange"></el-date-picker> -->

                    <!-- <el-select placeholder="是否入统" class="handle-select mr10" v-model="params.isStatistics" size="mini"  @change="tjChange">                       
                        <el-option :label="item.name" :value="item.value" v-for="(item) in isStatisticss" :key="item.name"></el-option>
                    </el-select> -->
                    <el-input placeholder="项目名称关键词" class="handle-input mr10" v-model="params.project_name"  size="mini"></el-input>
                    <!-- <el-input class="handle-select mr10" v-model="params.procedures" placeholder="前期手续办理情况"  size="mini"></el-input> -->
                    <el-button style="width: 90%;margin-left: 5%;margin-top: 10px;" type="primary" icon="search" @click="search" size="mini">搜索</el-button>
                </div>
            </div>
            <base-map  :projectsInfo="projectsInfo" style='height:100%'></base-map>
    </div>
</template>

<script>
    import baseMap from "../common/Map.vue"
    import bus from "../../assets/bus.js"
    import {projectType,projectProgress,loginUrl,projImplementOrgs,constructionEvolves,isStatisticss} from "../tool/Global/app-config.js";
    import {queryProjectdetail,apiGetUserInfo} from "../tool/Global/app-mgr.js";
    export default {
        components:{
            baseMap
        },
        data:function(){
            return {
                projectType:projectType,       
                projectProgress:projectProgress,           
                projectsInfo: [],
                params:{
                    projImplementOrg:null,
                    consStartYear:null,
                    consEndYear:null,
                    constructionEvolve:null,
                    planStartWorkTime:null,
                    realStartWorkTime:null,
                    isStatistics:null,
                    procedures:null,
                    name:null,
                    projType:null,
                    currentStage:null,
                         
                    project_name:null,
                    build_property_id:null,
                    tzlx:null,
                    xjxqlb:null
                },
                projImplementOrgs:null,
                constructionEvolves:null,
                isStatisticss:null
            }
        },
        mounted:function(){
            this.projImplementOrgs = ["全部"].concat(projImplementOrgs);
            this.constructionEvolves = constructionEvolves; 
            this.isStatisticss = [{name:"全部",value:"2"}].concat(isStatisticss);
            this.getProjectsInfo()
        },
        methods:{
            search(){
                this.getProjectsInfo();
            },
            tjChange(){
                this.getProjectsInfo();
            },
            getProjectsInfo(callback){
                var self = this;
                queryProjectdetail(this.params).then(function(result){
                    if(result.data.success){
                        self.projectsInfo = result.data.data.datalist;
                    }
                    if(typeof(callback)=="function"){
                        callback(result);
                    }
                })

            }

        }
    }
</script>
<style scoped>
    .leftInput{
        width:38%;
        margin-top:10px;
        float:left;
        margin-left: 10%;
    }
    .rightInput{
        width:38%;
        margin-left:4%;
        margin-top:10px;
        float:left
    }
    .show{
        height:100%;
        position: relative;
    }
    .leftPanel{
        height: 100%;
        width: 15%;
        float: left;
        background-color: white;
        overflow: hidden;
    }
    .handle-select{
        width:80%;
        margin-top:10px;
        margin-left: 10%;
    }
    .handle-input{
        width:80%;
        margin-left: 10%;
        margin-top:10px;
    }
    .seachPanel{
        width:96%;
        border: 1px solid #d6eefc;
        margin-left:2%;
        margin-top:10px;
        
    }
    .seachTitle{
        width:100%;
        height:38px;
        background-image: url("../../../static/img/show/leftTitle.png");
        margin-top:10px;
        background-size: 100% 100%;
        line-height: 38px;
        color: #248bc8;
        text-align: center;
        font-weight: 700;
        cursor:pointer;
    }
    .label{
        width: 50%;
        margin: 10px auto 0px;
        clear: both;
        font-size: 15px;
    }

</style>



